#include "Playfield.h"
#include "Random.h"
#include <sstream>

Playfield::Playfield(int iWidth, int iHeight, VisualObject *rep)
{
	representation = rep;
	width = iWidth;
	height = iHeight;
	reset();
}

void Playfield::reset()
{
	
	// Load one of the background files...
	std::string filename = std::string("images/bg");

	std::stringstream ss;
	ss << randomGenerator.inRangeIncl(1,6);
	std::string number;
	ss >> number;

	filename += number;
	filename += ".png";


	representation->loadImage(filename);
	representation->setOffsetX(0);
	representation->setOffsetY(0);


}
Playfield::~Playfield(void)
{
}

void Playfield::update(const double time)
{
	
}

void Playfield::getReadyForDraw()
{}
